package com.yunfei.fegin;


import org.springframework.stereotype.Component;

import java.util.concurrent.TimeUnit;

/**
 * @program: SchedualServiceHiHystric需要实现SchedualServiceHi 接口，并注入到Ioc容器中，代码如下：
 * @description:断路器返回类
 * @author: zhengyunfei
 * @create: 2018-07-03 14:55
 **/
@Component
public class RedisServiceHystric implements RedisService {
    @Override
    public String get(String jsonData) {
        return "网络连接超时，熔断器发挥了作用 "+jsonData;
    }

    @Override
    public boolean exists(String key) {
        set("HystricCallBack","app-redis-center");//网络连接超时，熔断器发挥了作用
        return false;
    }

    @Override
    public boolean set(String key, Object value) {
        return false;
    }

    @Override
    public boolean set1(String key, Object value, long time) {
        return false;
    }

    @Override
    public boolean set2(String key, Object value, long time, TimeUnit timeUnit) {
        return false;
    }

    @Override
    public String getExpireTime(String key) {
        return null;
    }

    @Override
    public boolean remove(String key) {
        return false;
    }


}
